home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
BASIC
/
2823.ZIP
/
ROSES.BAS
< prev
next >
Wrap
BASIC Source File
|
1990-08-21
|
1KB
|
39 lines
' +----------------------------------------------------------------------+
' | |
' | GRAFWIZ Copyright (c) 1990 Thomas G. Hanlin III |
' | |
' | The Graphics Wizard's Library for BASIC |
' | |
' +----------------------------------------------------------------------+
REM $INCLUDE: 'GRAFWIZ.BI'
' Note: we don't use DEFINT because we need single precision!
PI! = 3.141593
TotalRadius! = 40
G2Mode 1 ' 640x200 CGA
DO
G2Cls
G2Write "How many petals would you like (1-9) ? "
DO
ky$ = INKEY$
LOOP UNTIL LEN(ky$)
IF ky$ > "0" AND ky$ <= "9" THEN
G2Write ky$
Petals! = VAL(ky$)
FOR Angle! = 0! TO PI * 2! STEP .01
R! = 20 * COS(Petals! * Angle!)
G2Plot CINT(R! * COS(Angle!) + 310), CINT(R! * SIN(Angle!) + 100)
NEXT
G2Locate 24, 1
G2Write "Like to try another? "
DO
ky$ = INKEY$
LOOP UNTIL LEN(ky$)
END IF
LOOP WHILE UCASE$(ky$) = "Y"
G2Mode 0